<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<title>StoredAction</title>
<link href="../docs-assets/Breadcrumbs.css" rel="stylesheet" rev="stylesheet" type="text/css">
		<meta name="viewport" content="width=device-width initial-scale=1">
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<meta http-equiv="Content-Language" content="en-gb">

<link href="../docs-assets/Contents.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Progress.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Navigation.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Fonts.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Base.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Colours.css" rel="stylesheet" rev="stylesheet" type="text/css">
		
	</head>
	<body class="commentary-font">
		<nav role="navigation">
		<h1><a href="../index.html"><img src="../docs-assets/Inform.png" height=72> </a></h1>
<ul><li><a href="../index.html">home</a></li>
</ul><h2>Compiler</h2><ul>
<li><a href="../structure.html">structure</a></li>
<li><a href="../inbuildn.html">inbuild</a></li>
<li><a href="../inform7n.html">inform7</a></li>
<li><a href="../intern.html">inter</a></li>
<li><a href="../services.html">services</a></li>
<li><a href="../secrets.html">secrets</a></li>
</ul><h2>Other Tools</h2><ul>
<li><a href="../inblorbn.html">inblorb</a></li>
<li><a href="../inform6.html">inform6</a></li>
<li><a href="../inpolicyn.html">inpolicy</a></li>
</ul><h2>Resources</h2><ul>
<li><a href="../extensions.html">extensions</a></li>
<li><a href="../kits.html">kits</a></li>
</ul><h2>Repository</h2><ul>
<li><a href="https://github.com/ganelson/inform"><img src="../docs-assets/github.png" height=0> github</a></li>
</ul><h2>Related Projects</h2><ul>
<li><a href="https://github.com/ganelson/inweb"><img src="../docs-assets/github.png" height=0> inweb</a></li>
<li><a href="https://github.com/ganelson/intest"><img src="../docs-assets/github.png" height=0> intest</a></li>
</ul>
		</nav>
		<main role="main">
		<!-- Weave of 'StoredAction' generated by inweb -->
<div class="breadcrumbs">
    <ul class="crumbs"><li><a href="../index.html">Home</a></li><li><a href="../extensions.html">Kits</a></li><li><a href="index.html">WorldModelKit</a></li><li><b>StoredAction</b></li></ul></div>
<p class="purpose">StoredAction  Code to support the stored action kind of value.</p>

<ul class="toc"><li><a href="strdc.html#SP1">&#167;1. Block Format</a></li><li><a href="strdc.html#SP2">&#167;2. Creation</a></li><li><a href="strdc.html#SP3">&#167;3. Setting Up</a></li><li><a href="strdc.html#SP4">&#167;4. Destruction</a></li><li><a href="strdc.html#SP5">&#167;5. Copying</a></li><li><a href="strdc.html#SP6">&#167;6. Comparison</a></li><li><a href="strdc.html#SP7">&#167;7. Hashing</a></li><li><a href="strdc.html#SP8">&#167;8. Printing</a></li><li><a href="strdc.html#SP9">&#167;9. Involvement</a></li><li><a href="strdc.html#SP10">&#167;10. Nouns</a></li><li><a href="strdc.html#SP11">&#167;11. Pattern Matching</a></li><li><a href="strdc.html#SP12">&#167;12. Current Action</a></li><li><a href="strdc.html#SP13">&#167;13. Trying</a></li></ul><hr class="tocbar">

<p class="commentary firstcommentary"><a id="SP1" class="paragraph-anchor"></a><b>&#167;1. Block Format.</b>The short block of a stored action is simply a pointer to a long block. The
long block always has a length of 6 words.
</p>

<p class="commentary">An action which involves a topic &mdash; such as the one produced by the command
LOOK UP JIM MCDIVITT IN ENCYCLOPAEDIA &mdash; cannot be tried without the text
of that topic (JIM MCDIVITT) being available. That's no problem if the action
is tried in the same turn in which it is generated, because the text will
still be in the command buffer. But once we store actions up for future
use it becomes an issue. So when we store an action involving a topic,
we record the actual text typed at the time when it is stored, and this
goes into array entry 5 of the block. Because that in turn is text,
and therefore a block value on the heap in its own right, we have to be a
little more careful about destroying and copying stored actions than we
otherwise would be.
</p>

<p class="commentary">Note that entries 1 and 2 are values whose kind depends on the action in
entry 0: but they are never block values, because actions are not allowed
to apply to block values. This simplifies matters considerably.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">Constant</span><span class="plain-syntax"> </span><span class="identifier-syntax">STORA_ACTION_F</span><span class="plain-syntax"> = </span><span class="constant-syntax">0</span><span class="plain-syntax">;</span>
<span class="reserved-syntax">Constant</span><span class="plain-syntax"> </span><span class="identifier-syntax">STORA_NOUN_F</span><span class="plain-syntax"> = </span><span class="constant-syntax">1</span><span class="plain-syntax">;</span>
<span class="reserved-syntax">Constant</span><span class="plain-syntax"> </span><span class="identifier-syntax">STORA_SECOND_F</span><span class="plain-syntax"> = </span><span class="constant-syntax">2</span><span class="plain-syntax">;</span>
<span class="reserved-syntax">Constant</span><span class="plain-syntax"> </span><span class="identifier-syntax">STORA_ACTOR_F</span><span class="plain-syntax"> = </span><span class="constant-syntax">3</span><span class="plain-syntax">;</span>
<span class="reserved-syntax">Constant</span><span class="plain-syntax"> </span><span class="identifier-syntax">STORA_REQUEST_F</span><span class="plain-syntax"> = </span><span class="constant-syntax">4</span><span class="plain-syntax">;</span>
<span class="reserved-syntax">Constant</span><span class="plain-syntax"> </span><span class="identifier-syntax">STORA_COMMAND_TEXT_F</span><span class="plain-syntax"> = </span><span class="constant-syntax">5</span><span class="plain-syntax">; </span><span class="comment-syntax">text of command if necessary, 0 if not</span>
</pre>
<p class="commentary firstcommentary"><a id="SP2" class="paragraph-anchor"></a><b>&#167;2. Creation.</b>A stored action block has fixed size, so this is a single-block KOV: its
data consists of six words, laid out as shown in the following routine.
Note that it initialises to the default value for this KOV, an action
in which the player waits.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">[ </span><span class="identifier-syntax">STORED_ACTION_TY_Create</span><span class="plain-syntax"> </span><span class="identifier-syntax">kind_id</span><span class="plain-syntax"> </span><span class="identifier-syntax">sb_address</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">short_block</span><span class="plain-syntax"> </span><span class="identifier-syntax">long_block</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">long_block</span><span class="plain-syntax"> = </span><span class="identifier-syntax">CreatePVLongBlock</span><span class="plain-syntax">(</span><span class="identifier-syntax">STORED_ACTION_TY</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">InitialisePVLongBlockField</span><span class="plain-syntax">(</span><span class="identifier-syntax">long_block</span><span class="plain-syntax">, </span><span class="identifier-syntax">STORA_ACTION_F</span><span class="plain-syntax">, ##</span><span class="identifier-syntax">Wait</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">InitialisePVLongBlockField</span><span class="plain-syntax">(</span><span class="identifier-syntax">long_block</span><span class="plain-syntax">, </span><span class="identifier-syntax">STORA_NOUN_F</span><span class="plain-syntax">, </span><span class="constant-syntax">0</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">InitialisePVLongBlockField</span><span class="plain-syntax">(</span><span class="identifier-syntax">long_block</span><span class="plain-syntax">, </span><span class="identifier-syntax">STORA_SECOND_F</span><span class="plain-syntax">, </span><span class="constant-syntax">0</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">InitialisePVLongBlockField</span><span class="plain-syntax">(</span><span class="identifier-syntax">long_block</span><span class="plain-syntax">, </span><span class="identifier-syntax">STORA_ACTOR_F</span><span class="plain-syntax">, </span><span class="identifier-syntax">player</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">InitialisePVLongBlockField</span><span class="plain-syntax">(</span><span class="identifier-syntax">long_block</span><span class="plain-syntax">, </span><span class="identifier-syntax">STORA_REQUEST_F</span><span class="plain-syntax">, </span><span class="reserved-syntax">false</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">InitialisePVLongBlockField</span><span class="plain-syntax">(</span><span class="identifier-syntax">long_block</span><span class="plain-syntax">, </span><span class="identifier-syntax">STORA_COMMAND_TEXT_F</span><span class="plain-syntax">, </span><span class="constant-syntax">0</span><span class="plain-syntax">);</span>

<span class="plain-syntax">    </span><span class="identifier-syntax">short_block</span><span class="plain-syntax"> = </span><span class="identifier-syntax">CreatePVShortBlock</span><span class="plain-syntax">(</span><span class="identifier-syntax">sb_address</span><span class="plain-syntax">, </span><span class="identifier-syntax">kind_id</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">short_block</span><span class="plain-syntax">--&gt;0 = </span><span class="identifier-syntax">long_block</span><span class="plain-syntax">;</span>

<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">short_block</span><span class="plain-syntax">;</span>
<span class="plain-syntax">];</span>
</pre>
<p class="commentary firstcommentary"><a id="SP3" class="paragraph-anchor"></a><b>&#167;3. Setting Up.</b>In practice it's convenient for Inform to have a routine which creates a stored
action with a given slate of action variables, rather than have to set them
all one at a time, so the following is provided as a shorthand form.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">[ </span><span class="identifier-syntax">STORED_ACTION_TY_New</span><span class="plain-syntax"> </span><span class="identifier-syntax">a</span><span class="plain-syntax"> </span><span class="identifier-syntax">n</span><span class="plain-syntax"> </span><span class="identifier-syntax">s</span><span class="plain-syntax"> </span><span class="identifier-syntax">ac</span><span class="plain-syntax"> </span><span class="identifier-syntax">req</span><span class="plain-syntax">  </span><span class="identifier-syntax">stora</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">stora</span><span class="plain-syntax"> == </span><span class="constant-syntax">0</span><span class="plain-syntax">) </span><span class="identifier-syntax">stora</span><span class="plain-syntax"> = </span><span class="identifier-syntax">CreatePV</span><span class="plain-syntax">(</span><span class="identifier-syntax">STORED_ACTION_TY</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">WritePVField</span><span class="plain-syntax">(</span><span class="identifier-syntax">stora</span><span class="plain-syntax">, </span><span class="identifier-syntax">STORA_ACTION_F</span><span class="plain-syntax">, </span><span class="identifier-syntax">a</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">WritePVField</span><span class="plain-syntax">(</span><span class="identifier-syntax">stora</span><span class="plain-syntax">, </span><span class="identifier-syntax">STORA_NOUN_F</span><span class="plain-syntax">, </span><span class="identifier-syntax">n</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">WritePVField</span><span class="plain-syntax">(</span><span class="identifier-syntax">stora</span><span class="plain-syntax">, </span><span class="identifier-syntax">STORA_SECOND_F</span><span class="plain-syntax">, </span><span class="identifier-syntax">s</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">WritePVField</span><span class="plain-syntax">(</span><span class="identifier-syntax">stora</span><span class="plain-syntax">, </span><span class="identifier-syntax">STORA_ACTOR_F</span><span class="plain-syntax">, </span><span class="identifier-syntax">ac</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">WritePVField</span><span class="plain-syntax">(</span><span class="identifier-syntax">stora</span><span class="plain-syntax">, </span><span class="identifier-syntax">STORA_REQUEST_F</span><span class="plain-syntax">, </span><span class="identifier-syntax">req</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">WritePVField</span><span class="plain-syntax">(</span><span class="identifier-syntax">stora</span><span class="plain-syntax">, </span><span class="identifier-syntax">STORA_COMMAND_TEXT_F</span><span class="plain-syntax">, </span><span class="constant-syntax">0</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">stora</span><span class="plain-syntax">;</span>
<span class="plain-syntax">];</span>
</pre>
<p class="commentary firstcommentary"><a id="SP4" class="paragraph-anchor"></a><b>&#167;4. Destruction.</b>Entries 0 to 4 are forgettable non-block values: only the optional text
requires destruction.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">[ </span><span class="identifier-syntax">STORED_ACTION_TY_Destroy</span><span class="plain-syntax"> </span><span class="identifier-syntax">stora</span><span class="plain-syntax"> </span><span class="identifier-syntax">toc</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">toc</span><span class="plain-syntax"> = </span><span class="identifier-syntax">PVField</span><span class="plain-syntax">(</span><span class="identifier-syntax">stora</span><span class="plain-syntax">, </span><span class="identifier-syntax">STORA_COMMAND_TEXT_F</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">toc</span><span class="plain-syntax">) </span><span class="identifier-syntax">DestroyPV</span><span class="plain-syntax">(</span><span class="identifier-syntax">toc</span><span class="plain-syntax">);</span>
<span class="plain-syntax">];</span>
</pre>
<p class="commentary firstcommentary"><a id="SP5" class="paragraph-anchor"></a><b>&#167;5. Copying.</b>The only entry needing attention is, again, entry 5: if this is non-zero in
the source, then we need to create a new text block to hold a duplicate
copy of the text.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">[ </span><span class="identifier-syntax">STORED_ACTION_TY_Copy</span><span class="plain-syntax"> </span><span class="identifier-syntax">storato</span><span class="plain-syntax"> </span><span class="identifier-syntax">storafrom</span><span class="plain-syntax"> </span><span class="identifier-syntax">kind</span><span class="plain-syntax"> </span><span class="identifier-syntax">recycling</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">tocfrom</span><span class="plain-syntax"> </span><span class="identifier-syntax">tocto</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">CopyPVRawData</span><span class="plain-syntax">(</span><span class="identifier-syntax">storato</span><span class="plain-syntax">, </span><span class="identifier-syntax">storafrom</span><span class="plain-syntax">, </span><span class="identifier-syntax">kind</span><span class="plain-syntax">, </span><span class="identifier-syntax">recycling</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">tocfrom</span><span class="plain-syntax"> = </span><span class="identifier-syntax">PVField</span><span class="plain-syntax">(</span><span class="identifier-syntax">storafrom</span><span class="plain-syntax">, </span><span class="identifier-syntax">STORA_COMMAND_TEXT_F</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">tocfrom</span><span class="plain-syntax"> == </span><span class="constant-syntax">0</span><span class="plain-syntax">) </span><span class="reserved-syntax">return</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">tocto</span><span class="plain-syntax"> = </span><span class="identifier-syntax">CreatePV</span><span class="plain-syntax">(</span><span class="identifier-syntax">TEXT_TY</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">CopyPV</span><span class="plain-syntax">(</span><span class="identifier-syntax">tocto</span><span class="plain-syntax">, </span><span class="identifier-syntax">tocfrom</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">WritePVField</span><span class="plain-syntax">(</span><span class="identifier-syntax">storato</span><span class="plain-syntax">, </span><span class="identifier-syntax">STORA_COMMAND_TEXT_F</span><span class="plain-syntax">, </span><span class="identifier-syntax">tocto</span><span class="plain-syntax">);</span>
<span class="plain-syntax">];</span>

<span class="plain-syntax">[ </span><span class="identifier-syntax">STORED_ACTION_TY_LongBlockSize</span><span class="plain-syntax"> </span><span class="identifier-syntax">stora</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="constant-syntax">6</span><span class="plain-syntax">;</span>
<span class="plain-syntax">];</span>
</pre>
<p class="commentary firstcommentary"><a id="SP6" class="paragraph-anchor"></a><b>&#167;6. Comparison.</b>There is no very convincing ordering on stored actions, but we need to
devise a comparison which will exhaustively determine whether two actions
are or are not different.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">[ </span><span class="identifier-syntax">STORED_ACTION_TY_Compare</span><span class="plain-syntax"> </span><span class="identifier-syntax">storaleft</span><span class="plain-syntax"> </span><span class="identifier-syntax">storaright</span><span class="plain-syntax"> </span><span class="identifier-syntax">delta</span><span class="plain-syntax"> </span><span class="identifier-syntax">itleft</span><span class="plain-syntax"> </span><span class="identifier-syntax">itright</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">delta</span><span class="plain-syntax"> = </span><span class="identifier-syntax">PVField</span><span class="plain-syntax">(</span><span class="identifier-syntax">storaleft</span><span class="plain-syntax">, </span><span class="identifier-syntax">STORA_ACTION_F</span><span class="plain-syntax">) - </span><span class="identifier-syntax">PVField</span><span class="plain-syntax">(</span><span class="identifier-syntax">storaright</span><span class="plain-syntax">, </span><span class="identifier-syntax">STORA_ACTION_F</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">delta</span><span class="plain-syntax">) </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">delta</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">delta</span><span class="plain-syntax"> = </span><span class="identifier-syntax">PVField</span><span class="plain-syntax">(</span><span class="identifier-syntax">storaleft</span><span class="plain-syntax">, </span><span class="identifier-syntax">STORA_NOUN_F</span><span class="plain-syntax">) - </span><span class="identifier-syntax">PVField</span><span class="plain-syntax">(</span><span class="identifier-syntax">storaright</span><span class="plain-syntax">, </span><span class="identifier-syntax">STORA_NOUN_F</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">delta</span><span class="plain-syntax">) </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">delta</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">delta</span><span class="plain-syntax"> = </span><span class="identifier-syntax">PVField</span><span class="plain-syntax">(</span><span class="identifier-syntax">storaleft</span><span class="plain-syntax">, </span><span class="identifier-syntax">STORA_SECOND_F</span><span class="plain-syntax">) - </span><span class="identifier-syntax">PVField</span><span class="plain-syntax">(</span><span class="identifier-syntax">storaright</span><span class="plain-syntax">, </span><span class="identifier-syntax">STORA_SECOND_F</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">delta</span><span class="plain-syntax">) </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">delta</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">delta</span><span class="plain-syntax"> = </span><span class="identifier-syntax">PVField</span><span class="plain-syntax">(</span><span class="identifier-syntax">storaleft</span><span class="plain-syntax">, </span><span class="identifier-syntax">STORA_ACTOR_F</span><span class="plain-syntax">) - </span><span class="identifier-syntax">PVField</span><span class="plain-syntax">(</span><span class="identifier-syntax">storaright</span><span class="plain-syntax">, </span><span class="identifier-syntax">STORA_ACTOR_F</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">delta</span><span class="plain-syntax">) </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">delta</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">delta</span><span class="plain-syntax"> = </span><span class="identifier-syntax">PVField</span><span class="plain-syntax">(</span><span class="identifier-syntax">storaleft</span><span class="plain-syntax">, </span><span class="identifier-syntax">STORA_REQUEST_F</span><span class="plain-syntax">) - </span><span class="identifier-syntax">PVField</span><span class="plain-syntax">(</span><span class="identifier-syntax">storaright</span><span class="plain-syntax">, </span><span class="identifier-syntax">STORA_REQUEST_F</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">delta</span><span class="plain-syntax">) </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">delta</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">itleft</span><span class="plain-syntax"> = </span><span class="identifier-syntax">PVField</span><span class="plain-syntax">(</span><span class="identifier-syntax">storaleft</span><span class="plain-syntax">, </span><span class="identifier-syntax">STORA_COMMAND_TEXT_F</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">itright</span><span class="plain-syntax"> = </span><span class="identifier-syntax">PVField</span><span class="plain-syntax">(</span><span class="identifier-syntax">storaright</span><span class="plain-syntax">, </span><span class="identifier-syntax">STORA_COMMAND_TEXT_F</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">itleft</span><span class="plain-syntax">) &amp;&amp; (</span><span class="identifier-syntax">itright</span><span class="plain-syntax">)) </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">TEXT_TY_Compare</span><span class="plain-syntax">(</span><span class="identifier-syntax">itleft</span><span class="plain-syntax">, </span><span class="identifier-syntax">itright</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">itleft</span><span class="plain-syntax"> - </span><span class="identifier-syntax">itright</span><span class="plain-syntax">;</span>
<span class="plain-syntax">];</span>

<span class="plain-syntax">[ </span><span class="identifier-syntax">STORED_ACTION_TY_Distinguish</span><span class="plain-syntax"> </span><span class="identifier-syntax">stora1</span><span class="plain-syntax"> </span><span class="identifier-syntax">stora2</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">STORED_ACTION_TY_Compare</span><span class="plain-syntax">(</span><span class="identifier-syntax">stora1</span><span class="plain-syntax">, </span><span class="identifier-syntax">stora2</span><span class="plain-syntax">) == </span><span class="constant-syntax">0</span><span class="plain-syntax">) </span><span class="reserved-syntax">rfalse</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">rtrue</span><span class="plain-syntax">;</span>
<span class="plain-syntax">];</span>
</pre>
<p class="commentary firstcommentary"><a id="SP7" class="paragraph-anchor"></a><b>&#167;7. Hashing.</b></p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">[ </span><span class="identifier-syntax">STORED_ACTION_TY_Hash</span><span class="plain-syntax"> </span><span class="identifier-syntax">stora</span><span class="plain-syntax">  </span><span class="identifier-syntax">rv</span><span class="plain-syntax"> </span><span class="identifier-syntax">txt</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">rv</span><span class="plain-syntax"> = </span><span class="identifier-syntax">PVField</span><span class="plain-syntax">(</span><span class="identifier-syntax">stora</span><span class="plain-syntax">, </span><span class="identifier-syntax">STORA_ACTION_F</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">rv</span><span class="plain-syntax"> = </span><span class="identifier-syntax">rv</span><span class="plain-syntax"> * </span><span class="constant-syntax">33</span><span class="plain-syntax"> + </span><span class="identifier-syntax">PVField</span><span class="plain-syntax">(</span><span class="identifier-syntax">stora</span><span class="plain-syntax">, </span><span class="identifier-syntax">STORA_NOUN_F</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">rv</span><span class="plain-syntax"> = </span><span class="identifier-syntax">rv</span><span class="plain-syntax"> * </span><span class="constant-syntax">33</span><span class="plain-syntax"> + </span><span class="identifier-syntax">PVField</span><span class="plain-syntax">(</span><span class="identifier-syntax">stora</span><span class="plain-syntax">, </span><span class="identifier-syntax">STORA_SECOND_F</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">rv</span><span class="plain-syntax"> = </span><span class="identifier-syntax">rv</span><span class="plain-syntax"> * </span><span class="constant-syntax">33</span><span class="plain-syntax"> + </span><span class="identifier-syntax">PVField</span><span class="plain-syntax">(</span><span class="identifier-syntax">stora</span><span class="plain-syntax">, </span><span class="identifier-syntax">STORA_ACTOR_F</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">rv</span><span class="plain-syntax"> = </span><span class="identifier-syntax">rv</span><span class="plain-syntax"> * </span><span class="constant-syntax">33</span><span class="plain-syntax"> + </span><span class="identifier-syntax">PVField</span><span class="plain-syntax">(</span><span class="identifier-syntax">stora</span><span class="plain-syntax">, </span><span class="identifier-syntax">STORA_REQUEST_F</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">txt</span><span class="plain-syntax"> = </span><span class="identifier-syntax">PVField</span><span class="plain-syntax">(</span><span class="identifier-syntax">stora</span><span class="plain-syntax">, </span><span class="identifier-syntax">STORA_COMMAND_TEXT_F</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">txt</span><span class="plain-syntax">) </span><span class="identifier-syntax">rv</span><span class="plain-syntax"> = </span><span class="identifier-syntax">rv</span><span class="plain-syntax"> * </span><span class="constant-syntax">33</span><span class="plain-syntax"> + </span><span class="identifier-syntax">TEXT_TY_Hash</span><span class="plain-syntax">(</span><span class="identifier-syntax">txt</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">rv</span><span class="plain-syntax">;</span>
<span class="plain-syntax">];</span>
</pre>
<p class="commentary firstcommentary"><a id="SP8" class="paragraph-anchor"></a><b>&#167;8. Printing.</b>We share some code here with the routines originally written for the ACTIONS
testing command. (The <span class="extract"><span class="extract-syntax">DB</span></span> in <span class="extract"><span class="extract-syntax">DB_Action</span></span> stands for "debugging".) When
printing a topic, it prints the relevant words from the player's command:
so if our stored action is one which contains an entry 5, then we have to
temporarily adopt this as the player's command, and restore the old player's
command once printing is done. To do this, we need to save the old player's
command, and we do that by creating a text for the duration.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">[ </span><span class="identifier-syntax">STORED_ACTION_TY_Say</span><span class="plain-syntax"> </span><span class="identifier-syntax">stora</span><span class="plain-syntax"> </span><span class="identifier-syntax">text_of_command</span><span class="plain-syntax"> </span><span class="identifier-syntax">saved_command</span><span class="plain-syntax"> </span><span class="identifier-syntax">saved_pn</span><span class="plain-syntax"> </span><span class="identifier-syntax">saved_action</span><span class="plain-syntax"> </span><span class="identifier-syntax">K1</span><span class="plain-syntax"> </span><span class="identifier-syntax">K2</span><span class="plain-syntax"> </span><span class="identifier-syntax">at</span><span class="plain-syntax"> </span><span class="identifier-syntax">cf</span><span class="plain-syntax"> </span><span class="identifier-syntax">cw</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">WeakKindOfPV</span><span class="plain-syntax">(</span><span class="identifier-syntax">stora</span><span class="plain-syntax">) ~= </span><span class="identifier-syntax">STORED_ACTION_TY</span><span class="plain-syntax">) </span><span class="reserved-syntax">return</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">text_of_command</span><span class="plain-syntax"> = </span><span class="identifier-syntax">PVField</span><span class="plain-syntax">(</span><span class="identifier-syntax">stora</span><span class="plain-syntax">, </span><span class="identifier-syntax">STORA_COMMAND_TEXT_F</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">text_of_command</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">saved_command</span><span class="plain-syntax"> = </span><span class="identifier-syntax">CreatePV</span><span class="plain-syntax">(</span><span class="identifier-syntax">TEXT_TY</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">SNIPPET_TY_to_TEXT_TY</span><span class="plain-syntax">(</span><span class="identifier-syntax">saved_command</span><span class="plain-syntax">, </span><span class="identifier-syntax">players_command</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">SetPlayersCommand</span><span class="plain-syntax">(</span><span class="identifier-syntax">text_of_command</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">saved_pn</span><span class="plain-syntax"> = </span><span class="identifier-syntax">parsed_number</span><span class="plain-syntax">; </span><span class="identifier-syntax">saved_action</span><span class="plain-syntax"> = </span><span class="identifier-syntax">action</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">action</span><span class="plain-syntax"> = </span><span class="identifier-syntax">PVField</span><span class="plain-syntax">(</span><span class="identifier-syntax">stora</span><span class="plain-syntax">, </span><span class="identifier-syntax">STORA_ACTION_F</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">cf</span><span class="plain-syntax"> = </span><span class="identifier-syntax">consult_from</span><span class="plain-syntax">; </span><span class="identifier-syntax">cw</span><span class="plain-syntax"> = </span><span class="identifier-syntax">consult_words</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">at</span><span class="plain-syntax"> = </span><span class="identifier-syntax">FindAction</span><span class="plain-syntax">(-1);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">K1</span><span class="plain-syntax"> = </span><span class="identifier-syntax">ActionData</span><span class="plain-syntax">--&gt;(</span><span class="identifier-syntax">at</span><span class="plain-syntax">+</span><span class="identifier-syntax">AD_NOUN_KOV</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">K2</span><span class="plain-syntax"> = </span><span class="identifier-syntax">ActionData</span><span class="plain-syntax">--&gt;(</span><span class="identifier-syntax">at</span><span class="plain-syntax">+</span><span class="identifier-syntax">AD_SECOND_KOV</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">K1</span><span class="plain-syntax"> ~= </span><span class="identifier-syntax">OBJECT_TY</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">parsed_number</span><span class="plain-syntax"> = </span><span class="identifier-syntax">PVField</span><span class="plain-syntax">(</span><span class="identifier-syntax">stora</span><span class="plain-syntax">, </span><span class="identifier-syntax">STORA_NOUN_F</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">K1</span><span class="plain-syntax"> == </span><span class="identifier-syntax">UNDERSTANDING_TY</span><span class="plain-syntax">) &amp;&amp; (</span><span class="identifier-syntax">text_of_command</span><span class="plain-syntax"> == </span><span class="constant-syntax">0</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">saved_command</span><span class="plain-syntax"> == </span><span class="constant-syntax">0</span><span class="plain-syntax">) </span><span class="identifier-syntax">saved_command</span><span class="plain-syntax"> = </span><span class="identifier-syntax">CreatePV</span><span class="plain-syntax">(</span><span class="identifier-syntax">TEXT_TY</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">SNIPPET_TY_to_TEXT_TY</span><span class="plain-syntax">(</span><span class="identifier-syntax">saved_command</span><span class="plain-syntax">, </span><span class="identifier-syntax">players_command</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">text_of_command</span><span class="plain-syntax"> = </span><span class="identifier-syntax">CreatePV</span><span class="plain-syntax">(</span><span class="identifier-syntax">TEXT_TY</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">CopyPV</span><span class="plain-syntax">(</span><span class="identifier-syntax">text_of_command</span><span class="plain-syntax">, </span><span class="identifier-syntax">parsed_number</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">SetPlayersCommand</span><span class="plain-syntax">(</span><span class="identifier-syntax">text_of_command</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">parsed_number</span><span class="plain-syntax"> = </span><span class="identifier-syntax">players_command</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">consult_from</span><span class="plain-syntax"> = </span><span class="identifier-syntax">parsed_number</span><span class="plain-syntax">/100; </span><span class="identifier-syntax">consult_words</span><span class="plain-syntax"> = </span><span class="identifier-syntax">parsed_number</span><span class="plain-syntax">%100;</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">K2</span><span class="plain-syntax"> ~= </span><span class="identifier-syntax">OBJECT_TY</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">parsed_number</span><span class="plain-syntax"> = </span><span class="identifier-syntax">PVField</span><span class="plain-syntax">(</span><span class="identifier-syntax">stora</span><span class="plain-syntax">, </span><span class="identifier-syntax">STORA_SECOND_F</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">K2</span><span class="plain-syntax"> == </span><span class="identifier-syntax">UNDERSTANDING_TY</span><span class="plain-syntax">) &amp;&amp; (</span><span class="identifier-syntax">text_of_command</span><span class="plain-syntax"> == </span><span class="constant-syntax">0</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">saved_command</span><span class="plain-syntax"> == </span><span class="constant-syntax">0</span><span class="plain-syntax">) </span><span class="identifier-syntax">saved_command</span><span class="plain-syntax"> = </span><span class="identifier-syntax">CreatePV</span><span class="plain-syntax">(</span><span class="identifier-syntax">TEXT_TY</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">SNIPPET_TY_to_TEXT_TY</span><span class="plain-syntax">(</span><span class="identifier-syntax">saved_command</span><span class="plain-syntax">, </span><span class="identifier-syntax">players_command</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">text_of_command</span><span class="plain-syntax"> = </span><span class="identifier-syntax">CreatePV</span><span class="plain-syntax">(</span><span class="identifier-syntax">TEXT_TY</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">CopyPV</span><span class="plain-syntax">(</span><span class="identifier-syntax">text_of_command</span><span class="plain-syntax">, </span><span class="identifier-syntax">parsed_number</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">SetPlayersCommand</span><span class="plain-syntax">(</span><span class="identifier-syntax">text_of_command</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">parsed_number</span><span class="plain-syntax"> = </span><span class="identifier-syntax">players_command</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">consult_from</span><span class="plain-syntax"> = </span><span class="identifier-syntax">parsed_number</span><span class="plain-syntax">/100; </span><span class="identifier-syntax">consult_words</span><span class="plain-syntax"> = </span><span class="identifier-syntax">parsed_number</span><span class="plain-syntax">%100;</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">DB_Action</span><span class="plain-syntax">(</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">PVField</span><span class="plain-syntax">(</span><span class="identifier-syntax">stora</span><span class="plain-syntax">, </span><span class="identifier-syntax">STORA_ACTOR_F</span><span class="plain-syntax">),</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">PVField</span><span class="plain-syntax">(</span><span class="identifier-syntax">stora</span><span class="plain-syntax">, </span><span class="identifier-syntax">STORA_REQUEST_F</span><span class="plain-syntax">),</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">PVField</span><span class="plain-syntax">(</span><span class="identifier-syntax">stora</span><span class="plain-syntax">, </span><span class="identifier-syntax">STORA_ACTION_F</span><span class="plain-syntax">),</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">PVField</span><span class="plain-syntax">(</span><span class="identifier-syntax">stora</span><span class="plain-syntax">, </span><span class="identifier-syntax">STORA_NOUN_F</span><span class="plain-syntax">),</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">PVField</span><span class="plain-syntax">(</span><span class="identifier-syntax">stora</span><span class="plain-syntax">, </span><span class="identifier-syntax">STORA_SECOND_F</span><span class="plain-syntax">),</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">true</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">parsed_number</span><span class="plain-syntax"> = </span><span class="identifier-syntax">saved_pn</span><span class="plain-syntax">; </span><span class="identifier-syntax">action</span><span class="plain-syntax"> = </span><span class="identifier-syntax">saved_action</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">consult_from</span><span class="plain-syntax"> = </span><span class="identifier-syntax">cf</span><span class="plain-syntax">; </span><span class="identifier-syntax">consult_words</span><span class="plain-syntax"> = </span><span class="identifier-syntax">cw</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">text_of_command</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">SetPlayersCommand</span><span class="plain-syntax">(</span><span class="identifier-syntax">saved_command</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">DestroyPV</span><span class="plain-syntax">(</span><span class="identifier-syntax">saved_command</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">];</span>
</pre>
<p class="commentary firstcommentary"><a id="SP9" class="paragraph-anchor"></a><b>&#167;9. Involvement.</b>That completes the compulsory services required for this KOV to function:
from here on, the remaining routines provide definitions of stored action-related
phrases in the Standard Rules.
</p>

<p class="commentary">An action "involves" an object if it appears as either the actor or the first
or second noun.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">[ </span><span class="identifier-syntax">STORED_ACTION_TY_Involves</span><span class="plain-syntax"> </span><span class="identifier-syntax">stora</span><span class="plain-syntax"> </span><span class="identifier-syntax">item</span><span class="plain-syntax"> </span><span class="identifier-syntax">at</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">at</span><span class="plain-syntax"> = </span><span class="identifier-syntax">FindAction</span><span class="plain-syntax">(</span><span class="identifier-syntax">PVField</span><span class="plain-syntax">(</span><span class="identifier-syntax">stora</span><span class="plain-syntax">, </span><span class="identifier-syntax">STORA_ACTION_F</span><span class="plain-syntax">));</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">at</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">ActionData</span><span class="plain-syntax">--&gt;(</span><span class="identifier-syntax">at</span><span class="plain-syntax">+</span><span class="identifier-syntax">AD_NOUN_KOV</span><span class="plain-syntax">) == </span><span class="identifier-syntax">OBJECT_TY</span><span class="plain-syntax">) &amp;&amp;</span>
<span class="plain-syntax">            (</span><span class="identifier-syntax">PVField</span><span class="plain-syntax">(</span><span class="identifier-syntax">stora</span><span class="plain-syntax">, </span><span class="identifier-syntax">STORA_NOUN_F</span><span class="plain-syntax">) == </span><span class="identifier-syntax">item</span><span class="plain-syntax">)) </span><span class="reserved-syntax">rtrue</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">ActionData</span><span class="plain-syntax">--&gt;(</span><span class="identifier-syntax">at</span><span class="plain-syntax">+</span><span class="identifier-syntax">AD_SECOND_KOV</span><span class="plain-syntax">) == </span><span class="identifier-syntax">OBJECT_TY</span><span class="plain-syntax">) &amp;&amp;</span>
<span class="plain-syntax">            (</span><span class="identifier-syntax">PVField</span><span class="plain-syntax">(</span><span class="identifier-syntax">stora</span><span class="plain-syntax">, </span><span class="identifier-syntax">STORA_SECOND_F</span><span class="plain-syntax">) == </span><span class="identifier-syntax">item</span><span class="plain-syntax">)) </span><span class="reserved-syntax">rtrue</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">PVField</span><span class="plain-syntax">(</span><span class="identifier-syntax">stora</span><span class="plain-syntax">, </span><span class="identifier-syntax">STORA_ACTOR_F</span><span class="plain-syntax">) == </span><span class="identifier-syntax">item</span><span class="plain-syntax">) </span><span class="reserved-syntax">rtrue</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">rfalse</span><span class="plain-syntax">;</span>
<span class="plain-syntax">];</span>
</pre>
<p class="commentary firstcommentary"><a id="SP10" class="paragraph-anchor"></a><b>&#167;10. Nouns.</b>Extracting the noun or second noun from an action is a delicate business
because simply returning the values in entries 1 and 2 would not be type-safe;
it would fail to be an object if the stored action did not apply to objects.
So the following returns <span class="extract"><span class="extract-syntax">nothing</span></span> if requested to produce noun or second
noun for such an action.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">[ </span><span class="identifier-syntax">STORED_ACTION_TY_Part</span><span class="plain-syntax"> </span><span class="identifier-syntax">stora</span><span class="plain-syntax"> </span><span class="identifier-syntax">ind</span><span class="plain-syntax"> </span><span class="identifier-syntax">at</span><span class="plain-syntax"> </span><span class="identifier-syntax">ado</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">ind</span><span class="plain-syntax"> == </span><span class="identifier-syntax">STORA_NOUN_F</span><span class="plain-syntax"> </span><span class="reserved-syntax">or</span><span class="plain-syntax"> </span><span class="identifier-syntax">STORA_SECOND_F</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">ind</span><span class="plain-syntax"> == </span><span class="identifier-syntax">STORA_NOUN_F</span><span class="plain-syntax">) </span><span class="identifier-syntax">ado</span><span class="plain-syntax"> = </span><span class="identifier-syntax">AD_NOUN_KOV</span><span class="plain-syntax">; </span><span class="reserved-syntax">else</span><span class="plain-syntax"> </span><span class="identifier-syntax">ado</span><span class="plain-syntax"> = </span><span class="identifier-syntax">AD_SECOND_KOV</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">at</span><span class="plain-syntax"> = </span><span class="identifier-syntax">FindAction</span><span class="plain-syntax">(</span><span class="identifier-syntax">PVField</span><span class="plain-syntax">(</span><span class="identifier-syntax">stora</span><span class="plain-syntax">, </span><span class="identifier-syntax">STORA_ACTION_F</span><span class="plain-syntax">));</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">at</span><span class="plain-syntax">) &amp;&amp; (</span><span class="identifier-syntax">ActionData</span><span class="plain-syntax">--&gt;(</span><span class="identifier-syntax">at</span><span class="plain-syntax">+</span><span class="identifier-syntax">ado</span><span class="plain-syntax">) == </span><span class="identifier-syntax">OBJECT_TY</span><span class="plain-syntax">)) </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">PVField</span><span class="plain-syntax">(</span><span class="identifier-syntax">stora</span><span class="plain-syntax">, </span><span class="identifier-syntax">ind</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="reserved-syntax">nothing</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">PVField</span><span class="plain-syntax">(</span><span class="identifier-syntax">stora</span><span class="plain-syntax">, </span><span class="identifier-syntax">ind</span><span class="plain-syntax">);</span>
<span class="plain-syntax">];</span>
</pre>
<p class="commentary firstcommentary"><a id="SP11" class="paragraph-anchor"></a><b>&#167;11. Pattern Matching.</b>In order to apply an action pattern such as "doing something with the kazoo"
to a stored action, it needs to be the current action, because the code which
compiles conditions like this looks at the <span class="extract"><span class="extract-syntax">action</span></span>, <span class="extract"><span class="extract-syntax">noun</span></span>, ..., variables.
We don't want to do anything as disruptive as temporarily starting the stored
action and then halting it again, so instead we simply "adopt" it, saving
the slate of action variables and setting them from the stored action: almost
immediately after &mdash; the moment the condition has been tested &mdash; we "unadopt"
it again, restoring the stored values. Since the action pattern cannot itself
refer to a stored action, the following code won't be nested, and we don't
need to worry about stacking up saved copies of the action variables.
</p>

<p class="commentary"><span class="extract"><span class="extract-syntax">SAT_Tmp--&gt;0</span></span> stores the outcome of the condition, and is set in code
compiled by Inform.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">Array</span><span class="plain-syntax"> </span><span class="identifier-syntax">SAT_Tmp</span><span class="plain-syntax">--&gt;7;</span>
<span class="plain-syntax">[ </span><span class="identifier-syntax">STORED_ACTION_TY_Adopt</span><span class="plain-syntax"> </span><span class="identifier-syntax">stora</span><span class="plain-syntax"> </span><span class="identifier-syntax">at</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">SAT_Tmp</span><span class="plain-syntax">--&gt;1 = </span><span class="identifier-syntax">action</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">SAT_Tmp</span><span class="plain-syntax">--&gt;2 = </span><span class="identifier-syntax">noun</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">SAT_Tmp</span><span class="plain-syntax">--&gt;3 = </span><span class="identifier-syntax">second</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">SAT_Tmp</span><span class="plain-syntax">--&gt;4 = </span><span class="identifier-syntax">actor</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">SAT_Tmp</span><span class="plain-syntax">--&gt;5 = </span><span class="identifier-syntax">act_requester</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">SAT_Tmp</span><span class="plain-syntax">--&gt;6 = </span><span class="identifier-syntax">parsed_number</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">action</span><span class="plain-syntax"> = </span><span class="identifier-syntax">PVField</span><span class="plain-syntax">(</span><span class="identifier-syntax">stora</span><span class="plain-syntax">, </span><span class="identifier-syntax">STORA_ACTION_F</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">at</span><span class="plain-syntax"> = </span><span class="identifier-syntax">FindAction</span><span class="plain-syntax">(-1);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">ActionData</span><span class="plain-syntax">--&gt;(</span><span class="identifier-syntax">at</span><span class="plain-syntax">+</span><span class="identifier-syntax">AD_NOUN_KOV</span><span class="plain-syntax">) == </span><span class="identifier-syntax">OBJECT_TY</span><span class="plain-syntax">)</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">noun</span><span class="plain-syntax"> = </span><span class="identifier-syntax">PVField</span><span class="plain-syntax">(</span><span class="identifier-syntax">stora</span><span class="plain-syntax">, </span><span class="identifier-syntax">STORA_NOUN_F</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">else</span><span class="plain-syntax"> {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">parsed_number</span><span class="plain-syntax"> = </span><span class="identifier-syntax">PVField</span><span class="plain-syntax">(</span><span class="identifier-syntax">stora</span><span class="plain-syntax">, </span><span class="identifier-syntax">STORA_NOUN_F</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">noun</span><span class="plain-syntax"> = </span><span class="reserved-syntax">nothing</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">ActionData</span><span class="plain-syntax">--&gt;(</span><span class="identifier-syntax">at</span><span class="plain-syntax">+</span><span class="identifier-syntax">AD_SECOND_KOV</span><span class="plain-syntax">) == </span><span class="identifier-syntax">OBJECT_TY</span><span class="plain-syntax">)</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">second</span><span class="plain-syntax"> = </span><span class="identifier-syntax">PVField</span><span class="plain-syntax">(</span><span class="identifier-syntax">stora</span><span class="plain-syntax">, </span><span class="identifier-syntax">STORA_SECOND_F</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">else</span><span class="plain-syntax"> {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">parsed_number</span><span class="plain-syntax"> = </span><span class="identifier-syntax">PVField</span><span class="plain-syntax">(</span><span class="identifier-syntax">stora</span><span class="plain-syntax">, </span><span class="identifier-syntax">STORA_SECOND_F</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">second</span><span class="plain-syntax"> = </span><span class="reserved-syntax">nothing</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">actor</span><span class="plain-syntax"> = </span><span class="identifier-syntax">PVField</span><span class="plain-syntax">(</span><span class="identifier-syntax">stora</span><span class="plain-syntax">, </span><span class="identifier-syntax">STORA_ACTOR_F</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">PVField</span><span class="plain-syntax">(</span><span class="identifier-syntax">stora</span><span class="plain-syntax">, </span><span class="identifier-syntax">STORA_REQUEST_F</span><span class="plain-syntax">)) </span><span class="identifier-syntax">act_requester</span><span class="plain-syntax"> = </span><span class="identifier-syntax">player</span><span class="plain-syntax">; </span><span class="reserved-syntax">else</span><span class="plain-syntax"> </span><span class="identifier-syntax">act_requester</span><span class="plain-syntax"> = </span><span class="reserved-syntax">nothing</span><span class="plain-syntax">;</span>
<span class="plain-syntax">];</span>

<span class="plain-syntax">[ </span><span class="identifier-syntax">STORED_ACTION_TY_Unadopt</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">action</span><span class="plain-syntax"> = </span><span class="identifier-syntax">SAT_Tmp</span><span class="plain-syntax">--&gt;1;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">noun</span><span class="plain-syntax"> = </span><span class="identifier-syntax">SAT_Tmp</span><span class="plain-syntax">--&gt;2;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">second</span><span class="plain-syntax"> = </span><span class="identifier-syntax">SAT_Tmp</span><span class="plain-syntax">--&gt;3;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">actor</span><span class="plain-syntax"> = </span><span class="identifier-syntax">SAT_Tmp</span><span class="plain-syntax">--&gt;4;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">act_requester</span><span class="plain-syntax"> = </span><span class="identifier-syntax">SAT_Tmp</span><span class="plain-syntax">--&gt;5;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">parsed_number</span><span class="plain-syntax"> = </span><span class="identifier-syntax">SAT_Tmp</span><span class="plain-syntax">--&gt;6;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">SAT_Tmp</span><span class="plain-syntax">--&gt;0;</span>
<span class="plain-syntax">];</span>
</pre>
<p class="commentary firstcommentary"><a id="SP12" class="paragraph-anchor"></a><b>&#167;12. Current Action.</b>Although we never cast other values to stored actions, because none of them
really imply an action (not even an action name, since that gives no help
as to what the nouns might be), there is of course one action almost always
present within a story file at run-time, even if it is not a single value
as such: the action which is currently running. The following routine
translates that into a stored action &mdash; thus allowing us to store it.
</p>

<p class="commentary">This is the place where we look to see if the action applies to a topic as
either its noun or second noun, and if it does, we copy the player's
command into a text block-value in entry 5.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">[ </span><span class="identifier-syntax">STORED_ACTION_TY_Current</span><span class="plain-syntax"> </span><span class="identifier-syntax">stora</span><span class="plain-syntax"> </span><span class="identifier-syntax">at</span><span class="plain-syntax"> </span><span class="identifier-syntax">text_of_command</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">WeakKindOfPV</span><span class="plain-syntax">(</span><span class="identifier-syntax">stora</span><span class="plain-syntax">) ~= </span><span class="identifier-syntax">STORED_ACTION_TY</span><span class="plain-syntax">) </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="constant-syntax">0</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">WritePVField</span><span class="plain-syntax">(</span><span class="identifier-syntax">stora</span><span class="plain-syntax">, </span><span class="identifier-syntax">STORA_ACTION_F</span><span class="plain-syntax">, </span><span class="identifier-syntax">action</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">at</span><span class="plain-syntax"> = </span><span class="identifier-syntax">FindAction</span><span class="plain-syntax">(-1);</span>

<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">ActionData</span><span class="plain-syntax">--&gt;(</span><span class="identifier-syntax">at</span><span class="plain-syntax">+</span><span class="identifier-syntax">AD_NOUN_KOV</span><span class="plain-syntax">) == </span><span class="identifier-syntax">OBJECT_TY</span><span class="plain-syntax">)</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">WritePVField</span><span class="plain-syntax">(</span><span class="identifier-syntax">stora</span><span class="plain-syntax">, </span><span class="identifier-syntax">STORA_NOUN_F</span><span class="plain-syntax">, </span><span class="identifier-syntax">noun</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">else</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">WritePVField</span><span class="plain-syntax">(</span><span class="identifier-syntax">stora</span><span class="plain-syntax">, </span><span class="identifier-syntax">STORA_NOUN_F</span><span class="plain-syntax">, </span><span class="identifier-syntax">parsed_number</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">ActionData</span><span class="plain-syntax">--&gt;(</span><span class="identifier-syntax">at</span><span class="plain-syntax">+</span><span class="identifier-syntax">AD_SECOND_KOV</span><span class="plain-syntax">) == </span><span class="identifier-syntax">OBJECT_TY</span><span class="plain-syntax">)</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">WritePVField</span><span class="plain-syntax">(</span><span class="identifier-syntax">stora</span><span class="plain-syntax">, </span><span class="identifier-syntax">STORA_SECOND_F</span><span class="plain-syntax">, </span><span class="identifier-syntax">second</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">else</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">WritePVField</span><span class="plain-syntax">(</span><span class="identifier-syntax">stora</span><span class="plain-syntax">, </span><span class="identifier-syntax">STORA_SECOND_F</span><span class="plain-syntax">, </span><span class="identifier-syntax">parsed_number</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">WritePVField</span><span class="plain-syntax">(</span><span class="identifier-syntax">stora</span><span class="plain-syntax">, </span><span class="identifier-syntax">STORA_ACTOR_F</span><span class="plain-syntax">, </span><span class="identifier-syntax">actor</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">act_requester</span><span class="plain-syntax">) </span><span class="identifier-syntax">WritePVField</span><span class="plain-syntax">(</span><span class="identifier-syntax">stora</span><span class="plain-syntax">, </span><span class="identifier-syntax">STORA_REQUEST_F</span><span class="plain-syntax">, </span><span class="reserved-syntax">true</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">else</span><span class="plain-syntax"> </span><span class="identifier-syntax">WritePVField</span><span class="plain-syntax">(</span><span class="identifier-syntax">stora</span><span class="plain-syntax">, </span><span class="identifier-syntax">STORA_REQUEST_F</span><span class="plain-syntax">, </span><span class="reserved-syntax">false</span><span class="plain-syntax">);</span>

<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">at</span><span class="plain-syntax">) &amp;&amp; ((</span><span class="identifier-syntax">ActionData</span><span class="plain-syntax">--&gt;(</span><span class="identifier-syntax">at</span><span class="plain-syntax">+</span><span class="identifier-syntax">AD_NOUN_KOV</span><span class="plain-syntax">) == </span><span class="identifier-syntax">UNDERSTANDING_TY</span><span class="plain-syntax">) ||</span>
<span class="plain-syntax">            (</span><span class="identifier-syntax">ActionData</span><span class="plain-syntax">--&gt;(</span><span class="identifier-syntax">at</span><span class="plain-syntax">+</span><span class="identifier-syntax">AD_SECOND_KOV</span><span class="plain-syntax">) == </span><span class="identifier-syntax">UNDERSTANDING_TY</span><span class="plain-syntax">))) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">text_of_command</span><span class="plain-syntax"> = </span><span class="identifier-syntax">PVField</span><span class="plain-syntax">(</span><span class="identifier-syntax">stora</span><span class="plain-syntax">, </span><span class="identifier-syntax">STORA_COMMAND_TEXT_F</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">text_of_command</span><span class="plain-syntax"> == </span><span class="constant-syntax">0</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">text_of_command</span><span class="plain-syntax"> = </span><span class="identifier-syntax">CreatePV</span><span class="plain-syntax">(</span><span class="identifier-syntax">TEXT_TY</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">WritePVField</span><span class="plain-syntax">(</span><span class="identifier-syntax">stora</span><span class="plain-syntax">, </span><span class="identifier-syntax">STORA_COMMAND_TEXT_F</span><span class="plain-syntax">, </span><span class="identifier-syntax">text_of_command</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">SNIPPET_TY_to_TEXT_TY</span><span class="plain-syntax">(</span><span class="identifier-syntax">text_of_command</span><span class="plain-syntax">, </span><span class="identifier-syntax">players_command</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    } </span><span class="reserved-syntax">else</span><span class="plain-syntax"> </span><span class="identifier-syntax">WritePVField</span><span class="plain-syntax">(</span><span class="identifier-syntax">stora</span><span class="plain-syntax">, </span><span class="identifier-syntax">STORA_COMMAND_TEXT_F</span><span class="plain-syntax">, </span><span class="constant-syntax">0</span><span class="plain-syntax">);</span>

<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">stora</span><span class="plain-syntax">;</span>
<span class="plain-syntax">];</span>
</pre>
<p class="commentary firstcommentary"><a id="SP13" class="paragraph-anchor"></a><b>&#167;13. Trying.</b>Finally: having stored an action for perhaps many turns, we now let it happen,
either silently or not.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">[ </span><span class="identifier-syntax">STORED_ACTION_TY_Try</span><span class="plain-syntax"> </span><span class="identifier-syntax">stora</span><span class="plain-syntax"> </span><span class="identifier-syntax">ks</span><span class="plain-syntax">  </span><span class="identifier-syntax">text_of_command</span><span class="plain-syntax"> </span><span class="identifier-syntax">saved_command</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">WeakKindOfPV</span><span class="plain-syntax">(</span><span class="identifier-syntax">stora</span><span class="plain-syntax">) ~= </span><span class="identifier-syntax">STORED_ACTION_TY</span><span class="plain-syntax">) </span><span class="reserved-syntax">return</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">ks</span><span class="plain-syntax">) { @</span><span class="identifier-syntax">push</span><span class="plain-syntax"> </span><span class="identifier-syntax">keep_silent</span><span class="plain-syntax">; </span><span class="identifier-syntax">keep_silent</span><span class="plain-syntax">=1; }</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">text_of_command</span><span class="plain-syntax"> = </span><span class="identifier-syntax">PVField</span><span class="plain-syntax">(</span><span class="identifier-syntax">stora</span><span class="plain-syntax">, </span><span class="identifier-syntax">STORA_COMMAND_TEXT_F</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">text_of_command</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">saved_command</span><span class="plain-syntax"> = </span><span class="identifier-syntax">CreatePV</span><span class="plain-syntax">(</span><span class="identifier-syntax">TEXT_TY</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">SNIPPET_TY_to_TEXT_TY</span><span class="plain-syntax">(</span><span class="identifier-syntax">saved_command</span><span class="plain-syntax">, </span><span class="identifier-syntax">players_command</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">SetPlayersCommand</span><span class="plain-syntax">(</span><span class="identifier-syntax">text_of_command</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">TryAction</span><span class="plain-syntax">(</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">PVField</span><span class="plain-syntax">(</span><span class="identifier-syntax">stora</span><span class="plain-syntax">, </span><span class="identifier-syntax">STORA_REQUEST_F</span><span class="plain-syntax">),</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">PVField</span><span class="plain-syntax">(</span><span class="identifier-syntax">stora</span><span class="plain-syntax">, </span><span class="identifier-syntax">STORA_ACTOR_F</span><span class="plain-syntax">),</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">PVField</span><span class="plain-syntax">(</span><span class="identifier-syntax">stora</span><span class="plain-syntax">, </span><span class="identifier-syntax">STORA_ACTION_F</span><span class="plain-syntax">),</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">PVField</span><span class="plain-syntax">(</span><span class="identifier-syntax">stora</span><span class="plain-syntax">, </span><span class="identifier-syntax">STORA_NOUN_F</span><span class="plain-syntax">),</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">PVField</span><span class="plain-syntax">(</span><span class="identifier-syntax">stora</span><span class="plain-syntax">, </span><span class="identifier-syntax">STORA_SECOND_F</span><span class="plain-syntax">));</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">text_of_command</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">SetPlayersCommand</span><span class="plain-syntax">(</span><span class="identifier-syntax">saved_command</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">DestroyPV</span><span class="plain-syntax">(</span><span class="identifier-syntax">saved_command</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">ks</span><span class="plain-syntax">) { @</span><span class="identifier-syntax">pull</span><span class="plain-syntax"> </span><span class="identifier-syntax">keep_silent</span><span class="plain-syntax">; }</span>
<span class="plain-syntax">];</span>
</pre>
<nav role="progress"><div class="progresscontainer">
    <ul class="progressbar"><li class="progressprev"><a href="chrnl.html">&#10094;</a></li><li class="progresssection"><a href="mscll.html">mscll</a></li><li class="progresssection"><a href="stt.html">stt</a></li><li class="progresssection"><a href="lght.html">lght</a></li><li class="progresssection"><a href="lstwr.html">lstwr</a></li><li class="progresssection"><a href="ordrf.html">ordrf</a></li><li class="progresssection"><a href="actns.html">actns</a></li><li class="progresssection"><a href="fgrs.html">fgrs</a></li><li class="progresssection"><a href="otfwr.html">otfwr</a></li><li class="progresssection"><a href="prntn.html">prntn</a></li><li class="progresssection"><a href="wrldm.html">wrldm</a></li><li class="progresssection"><a href="mprtf.html">mprtf</a></li><li class="progresssection"><a href="tm.html">tm</a></li><li class="progresssection"><a href="tsts.html">tsts</a></li><li class="progresssection"><a href="chrnl.html">chrnl</a></li><li class="progresscurrent">strdc</li><li class="progressnextoff">&#10095;</li></ul></div>
</nav><!-- End of weave -->

		</main>
	</body>
</html>

